// custom-tab-bar/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    selected: 0 ,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: [{
        pagePath: "/pages/index/index",
        iconPath: "/assets/image/刷新.png",
        selectedIconPath: "/assets/image/刷新 (1).png",
        text: "工作"
      },
      {
        pagePath: "/pages/helper/helper",
        iconPath: "/assets/image/刷新.png",
        selectedIconPath: "/assets/image/刷新 (1).png",
        text: "助手"
      },
      {
        pagePath: "/pages/analyse/analyse",
        iconPath: "/assets/image/刷新.png",
        selectedIconPath: "/assets/image/刷新 (1).png",
        text: "常用"
      },
      {
        pagePath: "/pages/stock/stock",
        iconPath: "/assets/image/刷新.png",
        selectedIconPath: "/assets/image/刷新 (1).png",
        text: "分析"
      },
      {
        pagePath: "/pages/my/my",
        iconPath: "/assets/image/刷新.png",
        selectedIconPath: "/assets/image/刷新 (1).png",
        text: "我"
      }
    ]
  },
  attached() {},
  switchTab(e) {
    const data = e.currentTarget.dataset
    const url = data.path
    wx.switchTab({
      url
    })
    this.setData({
      selected: data.index
    })
  },
})